package com.sc.design.PK.create.abfac_builder.builder;

/**
 * @author sc
 * Created on  2017/12/7
 */
public class Director {
    private CarBuilder benzBuilder = new BenzBuilder();
    private CarBuilder bmwBuilder = new BMWBuilder();

    public  ICar createCar(CarBuilder carBuilder,String engine,String wheel){
        BluePrint bluePrint = new BluePrint();
        bluePrint.setEngine(engine);
        bluePrint.setWheel(wheel);
        carBuilder.receiverBluePrint(bluePrint);
        return carBuilder.buildCar();
    }
}
